/**
    ATClab - scriptable Air Traffic Control simulations.
    Copyright (C) 2010 openatclab@gmail.com

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
**/

#include "instructiontask.h"
#include <qlabel.h>

#include <qlayout.h>
//Added by qt3to4:
#include <Q3Frame>
#include <Q3VBoxLayout>


//------------------------------------------------------------------------------

/*!
 */
pact::InstructionTask::InstructionTask()
	:pact::Task()
	,_textBox(0)
{
	Q3VBoxLayout* layout = new Q3VBoxLayout(this, 20);

	_textBox = new QLabel(this);
	_textBox->setFrameStyle(Q3Frame::NoFrame|Q3Frame::Plain);
	_textBox->setWordWrap(true);
	_textBox->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);

	layout->addWidget(_textBox);
}

/*!
 */
pact::InstructionTask::~InstructionTask()
{}

//------------------------------------------------------------------------------

/*!
 */
void pact::InstructionTask::setText(const std::string &text){
	_textBox->setText(text.c_str());
}

//------------------------------------------------------------------------------
